package com.management.service.Impl;

import com.management.dao.SecPostAndDao;
import com.management.po.SecPostAnd;
import com.management.service.SecPostAndService;
import com.management.vo.SecPostAndVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ls
 * @category
 */
@Service
public class SecPostAndServiceImpl implements SecPostAndService {
    @Autowired
    SecPostAndDao secPostAndDao;

    @Override
    public List<SecPostAndVO> findAll() {
        return secPostAndDao.findAll();
    }

    @Override
    public List<SecPostAndVO> findBySectionAndPostId(int sectionAndPostId) {
        return secPostAndDao.findBySectionAndPostId(sectionAndPostId);
    }

    @Override
    public SecPostAndVO findBySecPostAndId(int secPostAndId) {
        return secPostAndDao.findBySecPostAndId(secPostAndId);
    }

    @Override
    public boolean add(SecPostAnd secPostAnd) {
        return secPostAndDao.add(secPostAnd)>0?true:false;
    }

    @Override
    public boolean delete(int secPostAndId) {
        return secPostAndDao.delete(secPostAndId)>0?true:false;
    }
}
